#include <ros/ros.h>
#include <geometry_msgs/PoseStamped.h>
#include <mavros_msgs/CommandBool.h>
#include <mavros_msgs/SetMode.h>
#include <mavros_msgs/State.h>
#include<std_msgs/Float64.h>
static void  myCallback(const std_msgs::Float64 &msg);
class minimal_subscriber
{
private:
       ros::NodeHandle n;
       ros::Subscriber my_object;
       

public:
    minimal_subscriber(/* args */);
    ~minimal_subscriber();
};
void myCallback(const std_msgs::Float64 &msg)
{
    ROS_INFO("recived value is: %f",msg.data);
}

minimal_subscriber::minimal_subscriber(/* args */)
{
    my_object=n.subscribe("topic1",10,myCallback);
    ros::spin();

}

minimal_subscriber::~minimal_subscriber()
{
}

int main(int argc, char **argv)
{
    ros::init(argc, argv, "minimal_subscriber");
    minimal_subscriber s1;
    
    
}